package com.shrct.businessprocess.customerservice.impl;

import com.shrct.businessprocess.customerservice.RCFaultReport;
import com.shrct.businessprocess.customerservice.RCFaultReportDAO;
import com.shrct.businessprocess.customerservice.impl.RCFaultReportImpl;
import edu.fudan.mylang.pf.BaseService;
import org.eclipse.xtext.xbase.lib.ObjectExtensions;
import org.eclipse.xtext.xbase.lib.Procedures.Procedure1;
import org.springframework.stereotype.Service;

@Service("com.shrct.businessprocess.customerservice.RCFaultReportDAO")
public class RCFaultReportDAOImpl extends BaseService implements RCFaultReportDAO {
  public RCFaultReport reportFault(final String comment, final Procedure1<? super RCFaultReport> preInit) {RCFaultReport rCFaultReport=RCFaultReportImpl.create(getObjectFactory());
    final Procedure1<RCFaultReport> _function = new Procedure1<RCFaultReport>() {
        public void apply(final RCFaultReport report) {
          report.start(comment);
          preInit.apply(report);
        }
      };
    RCFaultReport _doubleArrow = ObjectExtensions.<RCFaultReport>operator_doubleArrow(rCFaultReport, _function);
    return _doubleArrow;
  }
  
  public void deleteFaultReport(final RCFaultReport faultReport) {getObjectFactory().delete(faultReport);
    
  }
}
